package weather;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Random;
import javax.swing.Timer;


public class AlertData extends Observable{
    
    boolean cam;
    Observable observable;
    
    public AlertData(){
    Timer time = new Timer (2000, new ActionListener ()
         {
             public void actionPerformed(ActionEvent e)
             {
                 Random rdn = new Random();
                 int desc = (int)(rdn.nextInt(2));
                 if (desc==1){
                     setChanged();
                     notifyObservers(); 
                 }
             } 
         });
         time.start();
   }
}
